# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AppEngine.V1.Model.Deployment do
  @moduledoc """
  Code and application artifacts used to deploy a version to App Engine.

  ## Attributes

  *   `cloudBuildOptions` (*type:* `GoogleApi.AppEngine.V1.Model.CloudBuildOptions.t`, *default:* `nil`) - Options for any Google Cloud Build builds created as a part of this deployment.These options will only be used if a new build is created, such as when deploying to the App Engine flexible environment using files or zip.
  *   `container` (*type:* `GoogleApi.AppEngine.V1.Model.ContainerInfo.t`, *default:* `nil`) - The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment.
  *   `files` (*type:* `%{optional(String.t) => GoogleApi.AppEngine.V1.Model.FileInfo.t}`, *default:* `nil`) - Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.
  *   `zip` (*type:* `GoogleApi.AppEngine.V1.Model.ZipInfo.t`, *default:* `nil`) - The zip file for this deployment, if this is a zip deployment.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cloudBuildOptions => GoogleApi.AppEngine.V1.Model.CloudBuildOptions.t() | nil,
          :container => GoogleApi.AppEngine.V1.Model.ContainerInfo.t() | nil,
          :files => %{optional(String.t()) => GoogleApi.AppEngine.V1.Model.FileInfo.t()} | nil,
          :zip => GoogleApi.AppEngine.V1.Model.ZipInfo.t() | nil
        }

  field(:cloudBuildOptions, as: GoogleApi.AppEngine.V1.Model.CloudBuildOptions)
  field(:container, as: GoogleApi.AppEngine.V1.Model.ContainerInfo)
  field(:files, as: GoogleApi.AppEngine.V1.Model.FileInfo, type: :map)
  field(:zip, as: GoogleApi.AppEngine.V1.Model.ZipInfo)
end

defimpl Poison.Decoder, for: GoogleApi.AppEngine.V1.Model.Deployment do
  def decode(value, options) do
    GoogleApi.AppEngine.V1.Model.Deployment.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AppEngine.V1.Model.Deployment do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
